const getMusic = require('./getMusic/index');
const getTomorrowMusic = require('./getTomorrowMusic/index');
const addMusic = require('./addMusic/index');
const updateMusic = require('./updateMusic/index');

// 云函数入口函数
exports.main = async (event, context) => {
    switch (event.type) {
        case 'getMusic':
            return await getMusic.main(event, context);
        case 'getTomorrowMusic':
            return await getTomorrowMusic.main(event, context);
        case 'addMusic':
            return await addMusic.main(event, context);
        case 'updateMusic':
            return await updateMusic.main(event, context);
    }
}
// 每个云函数搭建命令
// 1. 打开music目录内置终端
// npm init
// npm install --save wx-server-sdk@latest